diff --git a/plugin/MaintenanceMode/MaintenanceMode.php b/plugin/MaintenanceMode/MaintenanceMode.php index 9dc9f4228..97058743f 100644 --- a/plugin/MaintenanceMode/MaintenanceMode.php +++ b/plugin/MaintenanceMode/MaintenanceMode.php @@ -1,68 +1,71 @@ Maintenance Mode is disabled on this site"; } return $desc; } public function getName() { return "MaintenanceMode"; } public function getUUID() { return "6dmaa392-7b14-44fb-aa33-51cba620d92e"; } public function getPluginVersion() { - return "1.0"; + return "1.0"; } public function getStart() { global $global, $config; $forbidden = array( - $global['systemRootPath'].'view/index.php', - $global['systemRootPath'].'view/channels.php', - $global['systemRootPath'].'view/channel.php' + $global['systemRootPath'] . 'view' . DIRECTORY_SEPARATOR . 'index.php', + $global['systemRootPath'] . 'view' . DIRECTORY_SEPARATOR . 'channels.php', + $global['systemRootPath'] . 'view' . DIRECTORY_SEPARATOR . 'channel.php' ); - if(empty($global['disableAdvancedConfigurations']) && !User::isAdmin() - && in_array($_SERVER["SCRIPT_FILENAME"] ,$forbidden)){ + $SCRIPT_FILENAME = str_replace('/', DIRECTORY_SEPARATOR, $_SERVER["SCRIPT_FILENAME"]); + //var_dump($SCRIPT_FILENAME, $forbidden);exit; + if (empty($global['disableAdvancedConfigurations']) && !User::isAdmin() && in_array($SCRIPT_FILENAME, $forbidden)) { $obj = $this->getDataObject(); include $global['systemRootPath'] . 'plugin/MaintenanceMode/index.php'; exit; } } public function getEmptyDataObject() { global $global; $obj = new stdClass(); $obj->text = 'Sorry for the inconvenience but we’re performing some maintenance at the moment. If you need to you can always contact us, otherwise we’ll be back online shortly!'; $obj->facebookLink = ''; $obj->twitterLink = ''; $obj->googleLink = ''; - $obj->discordLink = ''; + $obj->discordLink = ''; $obj->endIn = date("Y-m-d H:i:s", strtotime("+1 week")); $obj->hideClock = false; - $obj->backgroundImageURL = $global['webSiteRootURL']."plugin/MaintenanceMode/images/bg01.jpg"; + $obj->backgroundImageURL = $global['webSiteRootURL'] . "plugin/MaintenanceMode/images/bg01.jpg"; return $obj; } public function getFooterCode() { global $global, $config; $obj = $this->getDataObject(); include $global['systemRootPath'] . 'plugin/MaintenanceMode/footer.php'; } } diff --git a/plugin/MaintenanceMode/index.php b/plugin/MaintenanceMode/index.php index adda0c49e..04d1e1969 100644 --- a/plugin/MaintenanceMode/index.php +++ b/plugin/MaintenanceMode/index.php @@ -1,166 +1,166 @@ Coming Soon 1
hideClock) && !empty($obj->endIn)) { ?>
35 Days
17 Hours
50 Minutes
39 Seconds
LOGO

getContactEmail(), $obj->text); ?>

facebookLink)) { ?> twitterLink)) { ?> googleLink)) { ?> discordLink)) { ?>
hideClock) && !empty($obj->endIn)) { ?>